package com.cy.handerException;

import com.cy.util.JsonRueslt;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(RuntimeException.class)
    public JsonRueslt exceptionHander (Exception e){
        return  new JsonRueslt(0,e.getMessage());
    }
}
